package com.tarena.lbs.user.pojo.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AccessLevel;
import lombok.Data;
import lombok.experimental.FieldDefaults;

import java.io.Serializable;
import java.util.Date;

/**
 * 后台账号实体类
 */
@Data
@TableName("lbs_admin")
@FieldDefaults(level = AccessLevel.PRIVATE)
public class AdminPO implements Serializable {
    @Schema(description  = "账号ID", name = "id", example = "1", required = true)
    @TableId(value = "id", type = IdType.AUTO)
    Integer id;
    @Schema(description  = "手机号", name = "accountPhone", example = "19941253145", required = true)
    @TableField("account_phone")
    String accountPhone;
    @Schema(description  = "密码", name = "accountPassword", example = "123456", required = true)
    @TableField("account_password")
    String accountPassword;
    @Schema(description  = "用户名称", name = "nickname", example = "闫鹏宇", required = true)
    @TableField("nickname")
    String nickname;
    @Schema(description  = "电子邮箱", name = "email", example = "yanpengyu5@tedu.cn", required = true)
    @TableField("email")
    String email;
    @Schema(description  = "商家ID", name = "businessId", example = "1", required = true)
    @TableField("business_id")
    Integer businessId;
    @Schema(description  = "账号状态（是否启用）0 启用 -1禁用", name = "accountStatus", example = "1", required = true)
    @TableField("account_status")
    Integer accountStatus;
    @Schema(description  = "账号类型(平台、商家)", name = "accountType", example = "0", required = true)
    @TableField("account_type")
    Integer accountType;
    @Schema(description  = "创建时间", name = "createTime", example = "2022-05-01 10:10:10", required = true)
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    Date createTime;

}
